"use client";
import { Show } from "@refinedev/antd";
import { useShow } from "@refinedev/core";
import { Descriptions } from "antd";

export default function MenuShow() {
  const { queryResult } = useShow({ resource: "system/menu" });
  const record = queryResult?.data?.data;
  return (
    <Show>
      <Descriptions column={1} bordered size="middle">
        <Descriptions.Item label="菜单ID">{record?.menu_id}</Descriptions.Item>
        <Descriptions.Item label="菜单名称">{record?.menu_name}</Descriptions.Item>
        <Descriptions.Item label="父菜单ID">{record?.parent_id}</Descriptions.Item>
        <Descriptions.Item label="显示顺序">{record?.order_num}</Descriptions.Item>
        <Descriptions.Item label="路由地址">{record?.path}</Descriptions.Item>
        <Descriptions.Item label="组件路径">{record?.component}</Descriptions.Item>
        <Descriptions.Item label="菜单类型">{record?.menu_type}</Descriptions.Item>
        <Descriptions.Item label="菜单状态">{record?.visible === '0' ? '显示' : '隐藏'}</Descriptions.Item>
        <Descriptions.Item label="状态">{record?.status === '0' ? '正常' : '停用'}</Descriptions.Item>
        <Descriptions.Item label="权限标识">{record?.perms}</Descriptions.Item>
        <Descriptions.Item label="菜单图标">{record?.icon}</Descriptions.Item>
        <Descriptions.Item label="备注">{record?.remark}</Descriptions.Item>
      </Descriptions>
    </Show>
  );
} 